#define  _CRT_SECURE_NO_WARNINGS  1
#include <stdio.h>
int main()
{
	int a = 0;
	scanf("%d", &a);
	int i = 0;
	int n = 2, s = 0;
	for (i = 0; i < a; i++)
	{
		s = s + n;
		n += 3;
	}
	printf("%d", s);

	return 0;
}